package com.toolbox.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * Description：
 * </p>
 *
 * @author Mango
 * @version v1.0.0
 * @date 2023-12-06 15:14
 * @see com.toolbox.dto
 */
@Data
@ToString
@Accessors(chain = true)
@ApiModel("操作日志——展示数据")
public class InfraLogOperateDTO implements Serializable {

    private static final long serialVersionUID = 8868606194217190021L;

    /**
     * 主键ID
     */
    @ApiModelProperty(value = "主键ID", position = 100)
    private Long id;

    /**
     * 操作名称
     */
    @ApiModelProperty(value = "操作名称", position = 100)
    private String operateName;

    /**
     * 操作对象
     */
    @ApiModelProperty(value = "操作对象", position = 100)
    private String operateItem;

    /**
     * 请求URL
     */
    @ApiModelProperty(value = "请求URL", position = 100)
    private String url;

    /**
     * 请求方式
     */
    @ApiModelProperty(value = "请求方式", position = 100)
    private String method;

    /**
     * 请求参数
     */
    @ApiModelProperty(value = "请求参数", position = 100)
    private String requestData;

    /**
     * 响应参数
     */
    @ApiModelProperty(value = "响应参数", position = 100)
    private String responseData;

    /**
     * IP地址
     */
    @ApiModelProperty(value = "IP地址", position = 100)
    private String ipAddress;

    /**
     * 地区
     */
    @ApiModelProperty(value = "地区", position = 100)
    private String region;

    /**
     * 浏览器
     */
    @ApiModelProperty(value = "浏览器", position = 100)
    private String browser;

    /**
     * 操作系统
     */
    @ApiModelProperty(value = "操作系统", position = 100)
    private String operatingSystem;

    /**
     * 用户代理
     */
    @ApiModelProperty(value = "用户代理", position = 100)
    private String agent;

    /**
     * 执行时长
     */
    @ApiModelProperty(value = "执行时长", position = 100)
    private Long times;

    /**
     * 完整方法名
     */
    @ApiModelProperty(value = "完整方法名", position = 100)
    private String methodName;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", position = 100)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime gmtCreate;

}
